package com.lab.network.model;

import com.lab.network.proxy.Proxy;

import java.io.Serializable;

/**
 * Created by ak
 * 代理结果对象
 */
public class ProxyResult<T> implements Serializable {

    // 代理类
    private Class<? extends Proxy> mProxy;
    // 代理类名称
    private String mProxyName;
    // 处理结果
    private String mActionName;

    // 操作类型
    private int mType;
    // 错误码
    private int mError;
    // 错误信息
    private String mMsg;
    // 处理结果
    private T mData;

    public ProxyResult() {
    }

    public ProxyResult(Class<? extends Proxy> proxy, String proxyName, int type, int error, String msg, T data) {
        this.mProxy = proxy;
        this.mProxyName = proxyName;
        this.mType = type;
        this.mError = error;
        this.mMsg = msg;
        this.mData = data;
    }

    public ProxyResult(Class<? extends Proxy> proxy, int type, T data) {
        this.mProxy = proxy;
        this.mType = type;
        this.mData = data;
    }

    public ProxyResult(Class<? extends Proxy> proxy) {
        this.mProxy = proxy;
    }

    public Class<? extends Proxy> getProxy() {
        return mProxy;
    }

    public void setProxy(Class<? extends Proxy> proxy) {
        mProxy = proxy;
    }

    public String getProxyName() {
        return mProxyName;
    }

    public void setProxyName(String proxyName) {
        mProxyName = proxyName;
    }

    public int getType() {
        return mType;
    }

    public void setType(int type) {
        mType = type;
    }

    public int getError() {
        return mError;
    }

    public void setError(int error) {
        mError = error;
    }

    public String getMsg() {
        return mMsg;
    }

    public void setMsg(String msg) {
        mMsg = msg;
    }

    public T getData() {
        return mData;
    }

    public void setData(T data) {
        mData = data;
    }

    public String getmActionName() {
        return mActionName;
    }

    public void setmActionName(String mActionName) {
        this.mActionName = mActionName;
    }
}
